<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/include/head.jsp"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script type="text/javascript" src="<%=request.getContextPath()%>/js/jquery.js"></script>
<script type="text/javascript">
	function refreshImage(img) {
		var imageUrl = "<%=request.getContextPath()%>/back/manager/getCaptcha.do"; //你的生成图片的页面
		img.src = imageUrl + '?temp=' + Math.random();
	}
 	$(function() {
		$("input[name=adminUser\\.username]").focus();
	}); 
		//登陆的一些表单验证
	function validate() {
		var username = document.getElementById("employeeNumber").value;
		var pwd=document.getElementById("pwd").value;
		var yzm=document.getElementById("yzm").value;
		if (username.trim().length == 0 || username == "") {
			document.getElementById("username").focus();
			document.getElementById("ts").innerHTML = "用户名不能为空";
			return false;
		} 
		if(pwd.trim().length == 0 || pwd == ""){
		document.getElementById("pwd").focus();
			document.getElementById("ts").innerHTML = "用户密码不能为空";
			return false;
		}
		if(yzm.trim().length == 0 || yzm == ""){
		document.getElementById("yzm").focus();
			document.getElementById("ts").innerHTML = "验证码不能为空";
			return false;
		}
		return true;
	}	
</script>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>用户登录</title>
<link rel="stylesheet"
	href="<%=request.getContextPath()%>/resources/css/login.css">
<script type="text/javascript"
	src="<%=request.getContextPath()%>/resources/js/jquery.min.js"></script>
</head>
<body>
	<div id="login_top">
		<div id="welcome">欢迎使用青少年书法后台管理系统</div>
		<div id="back">
			<a href="/">返回首页</a>&nbsp;&nbsp; | &nbsp;&nbsp; <a href="#">帮助</a>
		</div>
	</div>
	<div id="login_center">
		<div id="login_area">
			<div id="login_form">
				<form
					action="<%=request.getContextPath()%>/back/manager/managerLogin.do"
					method="post" autocomplete="off" onsubmit="$('#loginScreenInfo').val(screen.width + '*' + screen.height);">
					<div id="login_tip">用户登录&nbsp;&nbsp;UserLogin</div>
					<div>
						<input type="text" class="username" name="employeeNumber" id="employeeNumber"
						 style="font-size:20px"	value="">
						 <!-- style="font-size:20px"	value="${request.username}">  -->
					</div>
					<div>
						<input type="password" class="pwd" name="pwd" id="pwd"
						 style="font-size:20px"	value="">
						 <!--  style="font-size:20px"	value="${request.pwd}">  -->
							<input type="hidden"
								name="screenInfo" id="loginScreenInfo" />
					</div>
					<div id="btn_area">
						<input type="submit" name="button" id="sub_btn"
							onclick="return validate(this)" value="登&nbsp;&nbsp;录">&nbsp;&nbsp;
						<input type="text" class="verify" name="yzm" id="yzm" style="font-size:20px"> <span
							style="margin-left:5px"> <img
							src="<%=request.getContextPath()%>/back/manager/getCaptcha.do"
							style="vertical-align: center;cursor:pointer" onclick="refreshImage(this);" 
							title="不区分大小写" alt="" /> </span>
					</div>
					<div id="ts" style="color: red; margin-top: 4px">${mesMap.mm}</div>
				</form>
			</div>
		</div>
	</div>
	<div id="login_bottom" style="color: #fff;">青少年书法版权所有（建议使用谷歌Chrome浏览器）</div>
</body>
</html>